
set nocompatible

"" switcher
let Tlist_Ctags_Cmd='C:\cygwin\bin\ctags.exe'

let g:lb=0

function SKBLast()
	if(1==g:lb)
		call feedkeys(":q!\<CR>:b #\<CR>")
	else
		let g:lb=1
		call feedkeys(":q!\<CR>:bNext\<CR>")
	endif
endfunction


function SKBSwitch(B)
	let g:lb=1
	call feedkeys(":q!\<CR>:b ".a:B."\<CR>")
endfunction

function SimpleKeyBuf()
	rightbelow 5new
	map <buffer> , :call SKBLast()<CR>
	map <buffer> q :q!<CR>
	map <buffer> o :q!<CR>:SessionList<CR>
	map <buffer> s :q!<CR>:SessionSave<CR>
	let l:n = 1
	let l:i = 1
	call feedkeys("i")
	while(l:i < bufnr('$'))
		if(buflisted(l:i))
			exec "map" "<buffer>" (''.l:n) ':call SKBSwitch('.l:i.')<CR>'
			call feedkeys(l:n." - ".bufname(l:i)."\<CR>")
			let l:n = l:n + 1
		endif
		let l:i = l:i + 1
	endwhile
	call feedkeys("\<ESC>")
endfunction

set sessionoptions-=options

command -nargs=0 SimpleKeyBuf call SimpleKeyBuf(<args>)
map , :SimpleKeyBuf<CR>
map m :SessionOpenLast<CR>
"" switcher end

set backspace=indent,eol,start
set ruler
set showcmd
set incsearch
set noet
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif

autocmd BufNewFile,BufRead *.hs set ts=2



